package com.ny.service.impl;

import com.ny.entity.Reservations;
import com.ny.mapper.ReservationMapper;
import com.ny.service.ReservationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReservationMapperImpl implements ReservationService {

    @Autowired
    private ReservationMapper reservationMapper;

    @Override
    public List<Reservations> findAllReservations() {
        return reservationMapper.findAllReservations();
    }

    @Override
    public void addReservation(Reservations reservations) {

            reservationMapper.addReservation(reservations);

    }
    @Override
    public void updateReservationStatus(int reservationId, String status, String rejectReason) {
        reservationMapper.updateReservationStatus(reservationId, status, rejectReason);
    }
}
